//
// Created by ct on 2021/9/22.
//

#include "mymath.h"


int add_one(my_once * myOnce){
    myOnce->a++;
    return myOnce->a;
}

math_interface init_myonce(my_once *myOnce){
    methods m = {
            .add_ond = (add_one_fn)add_one
    };
    math_interface anInterface = {
            .pthis = myOnce,
            .pmethods = &m
    };
    return anInterface;
}